<HTML>

<HEAD>

<TITLE>Time Zones</TITLE>

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin

function GetTime()
{
	var dt = new Date();
	var cdt = dt.getDate();
	var mth = dt.getMonth();
	var yer = dt.getYear();
	var def = dt.getTimezoneOffset()/60;
	var gmt = (dt.getHours() + def);

	//document.clock.local.value = (IfZero(dt.getMonth()+1) + "/" + IfZero(dt.getDate()) + "/" + IfZero(dt.getYear()) + " - " + IfZero(dt.getHours()) + ":" + IfZero(dt.getMinutes()) + ":" + IfZero(dt.getSeconds()));

	//document.clock.local.value = (IfZero(dt.getMonth()+1) + "/" + IfZero(dt.getDate()) + " - " + IfZero(dt.getHours()) + ":" + IfZero(dt.getMinutes()) + ":" + IfZero(dt.getSeconds()));

	var ending = ":" + IfZero(dt.getMinutes()) + ":" +  IfZero(dt.getSeconds());

	var outVal;


	// GMT
	outVal =check24(((gmt) > 24) ? ((gmt) - 24) : (gmt));
	document.getElementById( "gmtDisp" ).innerHTML = (IfZero(outVal) + ":" + IfZero(dt.getMinutes()) + ":" + IfZero(dt.getSeconds()));

	// Tokyo
	outVal =check24(((gmt + 9) > 24) ? ((gmt + 9) - 24) : (gmt + 9));
	document.getElementById( "tkyDisp" ).innerHTML = (IfZero(outVal) + ending);


	// Ottawa
	//outVal =check24(((gmt + (24-5)) > 24) ? ((gmt + (24-5)) - 24) : (gmt + (24-5)));

	// Ottawa DST
	outVal =check24(((gmt + (24-4)) > 24) ? ((gmt + (24-4)) - 24) : (gmt + (24-4)));
	document.getElementById( "ottDisp" ).innerHTML = (IfZero(outVal) + ending);


	// San Francisco
	//outVal =check24(((gmt + (24-8)) >= 24) ? ((gmt + (24-8)) - 24) : (gmt + (24-8)));

	// San Francisco DST
	outVal =check24(((gmt + (24-7)) >= 24) ? ((gmt + (24-7)) - 24) : (gmt + (24-7)));
	document.getElementById( "sfDisp" ).innerHTML = (IfZero(outVal) + ending);


	setTimeout( "GetTime()", 1000 );
}

function IfZero(num)
{
	return ((num <= 9) ? ("0" + num) : num);
}

function check24(hour)
{
	return (hour >= 24) ? hour - 24 : hour;
}

//  End -->


</script>

</HEAD>


<BODY style="background-color:#E6E6FA" onLoad="javascript:GetTime();">

<font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">
<h1>Time Zones</h1>

<table>

	<tr>
		<td><strong>GMT/UCT&nbsp;&nbsp;</strong></td>
		<td id="gmtDisp"></td>
	</tr>

	<tr>
		<td><strong>Tokyo (JST)&nbsp;&nbsp;</strong></td>
		<td id="tkyDisp"></td>
	</tr>

	<tr>
		<td><strong>Ottawa (EST)&nbsp;&nbsp;</strong></td>
		<td id="ottDisp"></td>
	</tr>

	<tr>
		<td><strong>San Francisco (PST)&nbsp;&nbsp;</strong></td>
		<td id="sfDisp"></td>
	</tr>

</table>
</font>

</BODY> 

</HTML>

